package com.cn.zmc.design.chian.disruptor.consumer;

import com.cn.zmc.design.chian.domain.Trade;
import com.lmax.disruptor.WorkHandler;
import org.springframework.stereotype.Component;

import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger;

@Component
public class ConsumerThree implements WorkHandler<Trade> {

	public static Random random = new Random();


	public void onEvent(Trade event) throws Exception {
		Thread.sleep(1 * random.nextInt(5));
		System.err.println("ConsumerThree  ->  消费信息ID: " + event.getId());
	}
	

}
